﻿<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        x:Class="VSCleaner.MainWindow"
        Title="VS Cleaner"
        Height="400"
        Width="600"
        WindowStartupLocation="CenterScreen"
        ResizeMode="CanMinimize">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="78.864" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Border Margin="0"
                d:LayoutOverrides="Height"
                BorderThickness="2"
                BorderBrush="Black">
            <StackPanel Orientation="Horizontal"
                        Height="65">
                <Button Content="Add Folder"
                        Command="{Binding AddFolderCommand}"
                        HorizontalAlignment="Left"
                        Height="65"
                        Margin="0"
                        Style="{DynamicResource AddFolderButtonStyle}"
                        Width="65"
                        VerticalAlignment="Center" />
                <Button Content="Clean"
                        Command="{Binding CleanCommand}"
                        HorizontalAlignment="Left"
                        Height="65"
                        Margin="0"
                        Style="{DynamicResource ClearButtonStyle}"
                        Width="65"
                        VerticalAlignment="Center"
                        IsEnabled="{Binding IsCleanAvailable}" />

            </StackPanel>

        </Border>
        <Border BorderBrush="Black"
                BorderThickness="2,0,2,2"
                Margin="0"
                Grid.Row="1">
            <ListBox Margin="2"
                     ItemsSource="{Binding FolderList}"
                     BorderBrush="{x:Null}"
                     Background="{x:Null}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal"
                                    Height="50"
                                    Margin="0,2"
                                    Width="560">
                            <Button Style="{DynamicResource DeleteButtonStyle}"
                                    Click="RemoveClick"
                                    Tag="{Binding}"
                                    Width="32"
                                    Height="32" />
                            <TextBlock Text="{Binding}"
                                       Margin="10,0"
                                       FontSize="16"
                                       TextTrimming="None"
                                       Width="500"
                                       TextWrapping="Wrap" />
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Border>
        <Grid Margin="0"
              Grid.RowSpan="2"
              Background="#BF000000"
              Visibility="{Binding CleanInProgressVisibility}">
            <TextBlock HorizontalAlignment="Center"
                       TextWrapping="Wrap"
                       Text="Please wait, cleaning VS temp files is in progress"
                       VerticalAlignment="Bottom"
                       Foreground="White"
                       FontSize="16"
                       Margin="0,0,0,50.36" />
            <ProgressBar HorizontalAlignment="Left"
                         Height="25"
                         VerticalAlignment="Top"
                         Width="250"
                         Margin="162,149,0,0" />
        </Grid>

    </Grid>
</Window>
